﻿@using Nop.Core.Domain.Shipping;

@model Logistics.Web.Models.Track.CourierCommissionModel

@{
    // TODO: string resource
    ViewBag.Title = "Courier Commission";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

    @Html.ValidationSummary(false)
        
    @Html.LabelFor(m => m.CourierName)
    @Html.DisplayFor(m => m.CourierName)
    <br />
    @Html.LabelFor(m => m.CourierEmail)
    @Html.DisplayFor(m => m.CourierEmail)
    <br />
    @Html.LabelFor(m => m.StartDate)
    @Html.DisplayFor(m => m.StartDate)
    <br />
    @Html.LabelFor(m => m.EndDate)
    @Html.DisplayFor(m => m.EndDate)
    <br />

@if (Model.Plans.Count > 0)
{
    <br /><br />
    <table border="1">
        <tr>
            <th>Plan ID</th>
            <th>Commission</th>
        </tr>

        @for ( var idx = 0; idx < Model.Plans.Count; idx++ )
        {            
            <tr>
                <td>@Html.DisplayFor(m => m.Plans[idx].PlanId)</td>
                <td>@Html.DisplayFor(m => m.Plans[idx].CourierCommission)</td>
            </tr>   
        } 

        <tr>
            <td>TOTAL</td>
            <td>@Html.DisplayFor(m => m.TotalCommission)</td>
        </tr>   
    </table>
}